package by.amakarevich.services;

import org.springframework.transaction.annotation.Transactional;

import by.amakarevich.datamodel.ShoppingCart;
import by.amakarevich.datamodel.UserAccount;

public interface ShoppingCartService {
	@Transactional
	void createNewShoppingCart(ShoppingCart shoppingCart, UserAccount userAccount);
	
	@Transactional
	ShoppingCart get(Long id);
	
	@Transactional
	void updateShoppingCart(ShoppingCart shoppingCart);
	
	@Transactional
	void removeShoppingCart(Long id);
	
	@Transactional
    void deleteAll();
	
	ShoppingCart getByUser(UserAccount user);
}
